﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopRuleData")]
    public class TopRuleData : BaseObject
    {
        //begin
        public TopRuleData()
        {}
        public TopRuleData(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _RuleId;
        public string RuleId
        {
            get
            {
                return _RuleId;
            }
            set
            {
                SetPropertyValue("RuleId", ref _RuleId, value);
            }
        }
        private string _SellerId;
        public string SellerId
        {
            get
            {
                return _SellerId;
            }
            set
            {
                SetPropertyValue("SellerId", ref _SellerId, value);
            }
        }
        private string _RuleName;
        public string RuleName
        {
            get
            {
                return _RuleName;
            }
            set
            {
                SetPropertyValue("RuleName", ref _RuleName, value);
            }
        }
        [Association("TopRuleDataGrouplist", typeof(TopGroupDomain)), Aggregated]
        public XPCollection<TopGroupDomain> Grouplist
        {
            get
            {
                return GetCollection<TopGroupDomain>("Grouplist");
            }
        }
        private DateTime _StartTradeTime;
        public DateTime StartTradeTime
        {
            get
            {
                return _StartTradeTime;
            }
            set
            {
                SetPropertyValue("StartTradeTime", ref _StartTradeTime, value);
            }
        }
        private DateTime _EndTradeTime;
        public DateTime EndTradeTime
        {
            get
            {
                return _EndTradeTime;
            }
            set
            {
                SetPropertyValue("EndTradeTime", ref _EndTradeTime, value);
            }
        }
        private decimal _MinAvgPrice;
        public decimal MinAvgPrice
        {
            get
            {
                return _MinAvgPrice;
            }
            set
            {
                SetPropertyValue("MinAvgPrice", ref _MinAvgPrice, value);
            }
        }
        private decimal _MaxAvgPrice;
        public decimal MaxAvgPrice
        {
            get
            {
                return _MaxAvgPrice;
            }
            set
            {
                SetPropertyValue("MaxAvgPrice", ref _MaxAvgPrice, value);
            }
        }
        private long _MinTradeCount;
        public long MinTradeCount
        {
            get
            {
                return _MinTradeCount;
            }
            set
            {
                SetPropertyValue("MinTradeCount", ref _MinTradeCount, value);
            }
        }
        private long _MaxTradeCount;
        public long MaxTradeCount
        {
            get
            {
                return _MaxTradeCount;
            }
            set
            {
                SetPropertyValue("MaxTradeCount", ref _MaxTradeCount, value);
            }
        }
        private long _MinItemCount;
        public long MinItemCount
        {
            get
            {
                return _MinItemCount;
            }
            set
            {
                SetPropertyValue("MinItemCount", ref _MinItemCount, value);
            }
        }
        private long _MaxItemCount;
        public long MaxItemCount
        {
            get
            {
                return _MaxItemCount;
            }
            set
            {
                SetPropertyValue("MaxItemCount", ref _MaxItemCount, value);
            }
        }
        private long _MinCloseTradeCount;
        public long MinCloseTradeCount
        {
            get
            {
                return _MinCloseTradeCount;
            }
            set
            {
                SetPropertyValue("MinCloseTradeCount", ref _MinCloseTradeCount, value);
            }
        }
        private long _MaxCloseTradeCount;
        public long MaxCloseTradeCount
        {
            get
            {
                return _MaxCloseTradeCount;
            }
            set
            {
                SetPropertyValue("MaxCloseTradeCount", ref _MaxCloseTradeCount, value);
            }
        }
        private decimal _MinTradeAmount;
        public decimal MinTradeAmount
        {
            get
            {
                return _MinTradeAmount;
            }
            set
            {
                SetPropertyValue("MinTradeAmount", ref _MinTradeAmount, value);
            }
        }
        private decimal _MaxTradeAmount;
        public decimal MaxTradeAmount
        {
            get
            {
                return _MaxTradeAmount;
            }
            set
            {
                SetPropertyValue("MaxTradeAmount", ref _MaxTradeAmount, value);
            }
        }
        private long _RelationSource;
        public long RelationSource
        {
            get
            {
                return _RelationSource;
            }
            set
            {
                SetPropertyValue("RelationSource", ref _RelationSource, value);
            }
        }
        private long _Province;
        public long Province
        {
            get
            {
                return _Province;
            }
            set
            {
                SetPropertyValue("Province", ref _Province, value);
            }
        }
        private long _Grade;
        public long Grade
        {
            get
            {
                return _Grade;
            }
            set
            {
                SetPropertyValue("Grade", ref _Grade, value);
            }
        }
        //end
    }
}
